package study2018.com.xtianzhuang.www.test;

import java.text.DecimalFormat;
import java.util.Scanner;

public class Main {
	public static int allAccout = 1;

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		String str = s.nextLine();
		String[] zimu = str.split("");
		if (zimu.length == 1) {
			allAccout = 1;
		} else {
			for (int i = 1; i < zimu.length; i++) {
				if (!zimu[i].equals(zimu[i - 1])) {
					allAccout++;
				}
			}
		}
		DecimalFormat df = new DecimalFormat("#.00");
		System.out.println(df.format((double) str.length() / allAccout));

	}
}
